//
//  OPZJNewCarTableViewCell.m
//  NewWorld
//
//  Created by 曾静 on 16/4/28.
//  Copyright © 2016年 itcast. All rights reserved.
//

#import "OPZJNewCarTableViewCell.h"
#import "OPZJNewCar.h"
@interface OPZJNewCarTableViewCell()
@property (weak, nonatomic) IBOutlet UILabel *name;
@property (weak, nonatomic) IBOutlet UILabel *nowPrice;

@property (weak, nonatomic) IBOutlet UILabel *nowCar;
@property (weak, nonatomic) IBOutlet UILabel *whiteLab;
@property (weak, nonatomic) IBOutlet UILabel *blackLab;
@property (weak, nonatomic) IBOutlet UILabel *city;
@property (weak, nonatomic) IBOutlet UILabel *price;
@property (weak, nonatomic) IBOutlet UILabel *people;
@property (weak, nonatomic) IBOutlet UILabel *time;

@end
@implementation OPZJNewCarTableViewCell
+(instancetype)newCar{
      return [[[NSBundle mainBundle] loadNibNamed:@"NewCar" owner:nil options:nil]lastObject];
}

- (void)awakeFromNib {
    // Initialization code
}
-(void)setCarNew:(OPZJNewCar *)carNew{
    _carNew = carNew;
    self.name.text = carNew.carBrand;
    self.name.textColor = [OPColorWithHex colorWithHexString:@"343434"];
    self.nowCar.text = carNew.carSource;
    self.nowCar.textColor = [OPColorWithHex colorWithHexString:@"666666"];
   
    
    self.whiteLab.text = [NSString stringWithFormat:@"|%@/",carNew.insideColor];
    self.whiteLab.textColor = [OPColorWithHex colorWithHexString:@"666666"];
    self.blackLab.text = [NSString stringWithFormat:@"%@",carNew.outsideColor];
    self.blackLab.textColor = [OPColorWithHex colorWithHexString:@"666666"];
    self.city.text =  [NSString stringWithFormat:@"|%@",@"销全国"];
    self.city.textColor = [OPColorWithHex colorWithHexString:@"666666"];
    int guidPrice = [carNew.guidePrice intValue];
    self.nowPrice.text = [NSString stringWithFormat:@"%.2f",guidPrice/10000.0];
    self.nowPrice.textColor = [UIColor redColor];
//    int diPrice = [carNew.didisPrice intValue];
    self.price.text = [NSString stringWithFormat:@"指导价:%.2f/%@",guidPrice/10000.0,carNew.disPrice];
    self.price.textColor =  [OPColorWithHex colorWithHexString:@"666666"];
    self.people.text = [NSString stringWithFormat:@"%@(北京)",carNew.sellerName];
    self.time.text = carNew.createTimeHM;
    self.time.textColor = [OPColorWithHex colorWithHexString:@"666666"];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
